<?php

	('Access-Control-Allow-Origin：*');
	// include("../xsdb.class.php");
	include("../mysql.php");
	$db = new mysql();
	
	$id = $_GET["id"];
	$type = $_GET["type"];
	$level = $_GET["level"];
	$ject = $_GET["ject"];
	$produ = $_GET["produ"];
	$price = $_GET["price"];
	$Agencyprice = $_GET["Agencyprice"];
	$Externalprice = $_GET["Externalprice"];
	$remarks = $_GET["remarks"];
	$addorupdate = $_GET["addorupdate"];
    $xuezhi = $_GET["xuezhi"];
	if($addorupdate ==1 ){
			$sql = "update educational set produ='{$produ}',ject='{$ject}',price='{$price}',Agencyprice='{$Agencyprice}',Externalprice='{$Externalprice}',level='{$level}',xuezhi='{$xuezhi}',remarks='{$remarks}',type='{$type}'  where id = '{$id}'";
	}
	else{
			$sql = "INSERT INTO educational (produ,ject,price,Agencyprice,Externalprice,level,xuezhi,remarks,type) VALUES ('{$produ}','{$ject}','{$price}','{$Agencyprice}','{$Externalprice}','{$level}','{$xuezhi}','{$remarks}','{$type}')";
	}

    echo $db->Query($sql);

	$db->close();
?>
